﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Bot.Application.Dto;
using Bot.Application.Services;
using Microsoft.AspNetCore.Mvc;

namespace Bot.WebAPI.Controllers
{
    [Route("api/v3/chatbot/subscription")]
    [ApiController]
    public class ChatbotSubscriptionController : ControllerBase
    {

        private readonly ISubscriptionAppService _app;
        public ChatbotSubscriptionController(ISubscriptionAppService app)
        {
            this._app = app;
        }

        [HttpGet]//code review by page HttpGet后面的括号去掉，如果有路由单独加一行route
        public ActionResult<SubscriptionDto> Get([FromQuery]string include)//code review by page add[FromQuery]
        {
            SubscriptionDto subscription = _app.Get(include);
            return Ok(subscription);
        }
    }
}
